package com.itheima.teacher.client.fallback;

import com.itheima.pojo.Order;
import com.itheima.teacher.client.OrderClient;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

/**
 * @author ：mengw9
 * @date ：Created By 2020/9/22 21:00
 * @description：
 * @version:
 */
@Component
public class OrderClientFallback implements OrderClient {


    @Override
    public List<Order> findAllOrder() {
        ArrayList<Order> orders = new ArrayList<>();
        Order order = new Order();
        order.setId(-1);
        order.setUsername("通用返回异常");

        orders.add(order);

        return orders;
    }
}
